﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace H.QuickDoes
{
    /// <summary>
    /// QuickDo工厂
    /// </summary>
    public interface IQuickDoFactory : IFactory
    {
        /// <summary>
        /// 创建一个QuickDo实例
        /// </summary>
        /// <typeparam name="C">QuickDo的上下文类型</typeparam>
        /// <returns>返回一个实例</returns>
        IQuickDo<C> CreateInstance<C>() where C : IQDContext, new();

        /// <summary>
        /// 创建一个QuickDo实例
        /// </summary>
        /// <typeparam name="C">QuickDo的上下文类型</typeparam>
        /// <param name="context">使用一个已有的上下文实例</param>
        /// <returns>返回一个实例</returns>
        IQuickDo<C> CreateInstance<C>(C context) where C : IQDContext;
    }
}
